import React, { useEffect } from 'react'
import { autoComplete } from '@/service/api'

const SearchList = props => {

  useEffect(() => {
    // 请求接口
    autoComplete(props.text).then(res => {
      console.log(res.keywords)
    })
  }, [props.text])

  return (
    <div className="search-list">
      搜索内容 === {props.text}
    </div>
  )
}

export default SearchList
